<%@page import="com.wlw.entity.User"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	User user = (User)request.getSession().getAttribute("user");
	String province = "";
	String city = "";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>foreground/"/>
<meta http-equiv="Content-Type" content="text/html;" />
<title>目的地 -开溜儿网 -</title>
<link type="text/css" rel="stylesheet" href="css/style.css"/>
<link rel="stylesheet" type="text/css" href="css/style1.css" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.scrollfollow.js"></script>
<script type="text/javascript" src="js/flash.js"></script>
<script type="text/javascript" src="js/int.js"></script>
<script src="js/CJL.0.1.min.js"></script>
<script src="js/AlertBox.js"></script>
<link rel="shortcut icon" href="favicon.ico"/>
<link rel="icon" href="animated_favicon.gif" type="image/gif"/>
<link href="nav.css" rel="stylesheet" type="text/css"/>
<script language="javascript" src="common.js"></script>
<script language="javascript" src="nav.js"></script>
<!-- 通过新浪地址库获得当前城市位置。 -->
<script src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js" type="text/ecmascript"></script>
<style>
#clazz_area {
	width: 100%;
	height: 300px;
	border: 1px solid red;
}
</style>
<style type="text/css">
	table tr {padding:20px;}
	table tr td{padding:10px;}
</style>
</head>
<body style="background:url(images/body_bg.jpg) no-repeat #72c8eb;">
	<div id="topBar">
		<div class="wrapper">
			<div class="l">游客您好，欢迎访问开溜儿旅游网！</div>
			<div class="r1" style="float:right; margin:3px; margin-left:30px">
			<%
				if(user==null){
			 %>
			<form action="<%=path%>/user/login.do" method="post" style="margin:0px;display:inline;">
				用户名:<input name="uname" class="input" placeholder="会员账号" style="height: 21px;margin-bottom: 4px" onfocus="this.placeholder=''" onblur="if(this.value=='')this.placeholder='会员账号';" type="text"/>
				密码:<input name="pwd" class="input" placeholder="请输入密码" style="height: 21px;margin-bottom: 4px" onfocus="this.placeholder=''" onblur="if(this.value=='')this.placeholder='请入输密码';" type="password"/>
				<input value="立即登录" style="background-color:#FFFFFF;border: 0px none;width: 72px;height: 28px;margin-top: -4px;color: red;font-size: 14px;font-weight: bold;cursor: pointer;"
						type="submit"/>
			</form>
					<a href="#" style="color:#84C1FF">忘记了密码？</a>
						<input value="注 册" id="idCenter" 
						style="background-color:#FFFFFF;border: 0px none;width: 72px;height: 28px;margin-top: -4px;color: red;font-size: 14px;font-weight: bold;cursor: pointer;"
						type="submit">
							<style>
							.lightbox{width:350px;height:360px;background-color:#FFF;border:1px solid #0051c1;line-height:20px;display:none; margin:0;}
							.lightbox dt{background-color: #0051c1;padding:5px;}
							.lightbox dd{ padding:20px; margin:0;}
							
						</style>
							
						<br />
						<dl id="idBox" class="lightbox" style="top:10%;left:5%;background-color: #fff;">
							<dt>
								<b>欢迎您注册开溜儿网！</b>
								<input style="float:right; background-color: #0051c1;border: 0px red solid;" type="button" value="X" id="idBoxClose"/>
							</dt>
						<center>
							<dd>
								<form action="<%=path%>/user/register.do" method="post" enctype="multipart/form-data">
									<table>
										<tr style="padding:30px;">
											<td>用户名：</td>
											<td>
												<input type="hidden" name="id" value="${u.id}"/>
												<input type="text" name="uname" value="${u.uname}" id="idBoxTxt">
											</td>
										</tr>
										<tr>
											<td>密&nbsp;&nbsp;&nbsp;码：</td>
											<td><input type="password"  name="pwd" value="" id="idBoxTxt">
											</td>
										</tr>
										<tr>
											<td>确认密码：</td>
											<td><input type="password" value="" id="idBoxTxt">
											</td>
										</tr>
										<tr>
											<td>E-mail：</td>
											<td><input type="text" name="email" value="${u.email}" id="idBoxTxt">
											</td>
										</tr>
										<tr>
											<td>电&nbsp;&nbsp;&nbsp;话：</td>
											<td><input type="text"  name="telPhone" value="${u.telPhone}"
												id="idBoxTxt">
											</td>
										</tr>
										<tr>
											<td>
												<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
												<input style="width: 50px;height: 30px;" type="submit" value=" 确&nbsp;&nbsp;定 "/><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
											</td>
											<td>
												<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
												<input style="width: 50px;height: 30px;" type="reset" value=" 重置 "/><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
											</td>
										</tr>
									</table>
									
								</form>
							</dd>
						</center>
						</dl>
						<script>
							(function(){
							
							var ab = new AlertBox("idBox"), lock = false;
							
							//锁定键盘
							function lockup(e){ e.preventDefault(); }
							//高亮层不锁定
							function lockout(e){ e.stopPropagation(); }
							
							ab.onShow = function(){
								$$("idBoxTxt").select();
								if ( lock ) {
									$$E.addEvent( document, "keydown", lockup );
									$$E.addEvent( this.box, "keydown", lockout );
									OverLay.show();
								}
							}
							ab.onClose = function(){
								$$("idMsg").innerHTML = $$("idBoxTxt").value;
								$$E.removeEvent( document, "keydown", lockup );
								$$E.removeEvent( this.box, "keydown", lockout );
								OverLay.close();
							}
							
							$$("idBoxClose").onclick = function(){ ab.close(); }
							
							$$("idCenter").onclick = function(){
								ab.center = true;
								ab.show();
							}
							})()
						</script> 
			<%}else{%>
				<h4>欢迎您 ，<a style="color:#fff;" href="<%=path%>/user/myInfo.do">${user.uname}</a>
					<form action="<%=path%>/user/logout.do" style="display: inline;margin: 0px;">
						<input value="注销" id="idCenter" 
								style="background-color:#FFFFFF;border: 0px none;width: 72px;height: 28px;margin-top: -4px;color: red;font-size: 14px;font-weight: bold;cursor: pointer;"
								type="submit">
					</form>
				</h4>
				<%} %>
			</div>
		</div>
	</div>
	<div id="header">
		<div class="wrapper">
			<div class="logo">
				<a href="<%=path%>"><img src="images/logo.png">
				</a>
			</div>
				<div class="search">
					<dl>
						<dd>
							<a id="search_type1"
								onclick="select_search_type(1);return false;" href="#"
								class="current">景点</a>
						</dd>
						<dd>
							<a id="search_type2"
								onclick="select_search_type(2);return false;" href="#">城市</a>
						</dd>
						<dd>
							<a id="search_type3"
								onclick="select_search_type(3);return false;" href="#">问答</a>
						</dd>
					</dl>
					<div>
						<input id="s" type="text" style="height: 35px;padding-left: 25px;" name="search"
							onfocus="if(this.value=='这是一个神奇的搜索'){this.value='';}"
							value="这是一个神奇的搜索" style="padding: 10;"/><input
							name="search_type" id="search_type" value="1" type="hidden" />
							<script type="text/javascript">
								function search(){
									var s = document.getElementById("s").value;
									var type = document.getElementById('search_type').value;
									var uri = encodeURI(encodeURI(s));
									window.location.href='${pageContext.request.contextPath}/user/search.do?search='+uri+'&search_type='+type;
								}
							</script>
							
						<button type="submit"  onclick="search();">搜索</button>
					</div>
				</div>
		</div>
	</div>

	<div id="nav">
		<dl>
			<div>
				<label id="location"></label>
			   <script type="text/javascript">
			   //通过新浪地址库获得地址。
			   
					document.getElementById("location").innerHTML="您当前的位置："+remote_ip_info["province"]+"省"+"|"+remote_ip_info["city"] + "市";
			   </script>
			</div>
			<dd>
				<a href="<%=path%>/travalNoteManage/listTravalNote.do" target="_blank" class="a2">全部游记</a>
			</dd>
			<dd>
				<a href="<%=path%>/foreground/fabiaoyoujis.jsp" target="_blank" class="a3">发表游记</a>
			</dd>
		</dl>
		<ul>
			<li><a href="<%=path%>/" class="a1">首页</a>
			</li>
			<li><a href="<%=path%>/travalNoteManage/traval.do" class="a2">旅游攻略</a>
			</li>
			<li><a href="<%=path%>/city/list.do" class="a4">目的地</a>
			</li>
			<li><a href="<%=path%>/city/laLongutitude.do" class="a6">地图</a>
			</li>
			<li><a href="<%=path%>/qaManage/quest.do?pageNo=1" class="a5">问答</a>
			</li>
			<li><a href="<%=path%>/user/myInfo.do" class="a7">个人中心</a>
			</li>
		</ul>
	</div>
	<script type="text/javascript">
		function select_search_type(n) {
			document.getElementById('search_type1').className = '';
			document.getElementById('search_type2').className = '';
			document.getElementById('search_type3').className = '';
			document.getElementById('search_type' + n).className = 'current';
			document.getElementById('search_type').value = n;
		}
	</script>
<div id="main">
	<div id="page">
		<div class="pageLeft">
			<h2 class="t5">目的地</h2>
			<div class="subNav">
				<div>
					<ul>
						<li><a href="javascript:void(0)" onclick="document.getElementById('jidu').scrollIntoView();">季度旅游推荐</a></li>
					</ul>
				</div>			
			</div>
			<div class="ad">
				<a href="#"><img src="images/ad1.jpg" /></a>
				<a href="#"><img src="images/ad1.jpg" /></a>
				<a href="#"><img src="images/ad1.jpg" /></a>
				<a href="#"><img src="images/ad1.jpg" /></a>
			</div>
		</div>		
		<div class="pageRight">
			<div class="youMain">
				<div class="itemB">
						<h2>
							<a id="jidu" class="current">季度旅游--春</a>
						</h2>
						<ul>
							<c:forEach items="${chunCities}" var="c">
								<li><a href="<%=path%>/city/cityDetail.do?id=${c.id}" target="_blank"><img
										src="<%=path%>/foreground/${c.images}" />
									</a>
									<p>
										<a href="specialty_detail.aspx?sid=3">${c.name}</a>
									</p>
								</li>
							</c:forEach>
						</ul>
						<a href="speicalty.aspx" target="_blank" class="more"></a>
					</div>
			
			<div class="itemB" style="padding-top: 20px;">
						<h2>
							<a href="" class="current">季度旅游--夏</a>
						</h2>
						<ul>
							<c:forEach items="${xiaCities}" var="c">
								<li><a href="<%=path%>/city/cityDetail.do?id=${c.id}" target="_blank"><img
										src="<%=path%>/foreground/${c.images}" />
									</a>
									<p>
										<a href="specialty_detail.aspx?sid=3">${c.name}</a>
									</p>
								</li>
							</c:forEach>
						</ul>
						<a href="speicalty.aspx" target="_blank" class="more"></a>
					</div>
			<div class="itemB" style="padding-top: 20px;">
						<h2>
							<a href="" class="current">季度旅游--秋</a>
						</h2>
						<ul>
							<c:forEach items="${qiuCities}" var="c">
								<li><a href="<%=path%>/city/cityDetail.do?id=${c.id}" target="_blank"><img
										src="<%=path%>/foreground/${c.images}" />
									</a>
									<p>
										<a href="specialty_detail.aspx?sid=3">${c.name}</a>
									</p>
								</li>
							</c:forEach>
						</ul>
						<a href="speicalty.aspx" target="_blank" class="more"></a>
					</div>
			<div class="itemB" style="padding-top: 20px;height:400px;">
						<h2>
							<a href="" class="current">季度旅游--冬</a>
						</h2>
						<ul>
							<c:forEach items="${dongCities}" var="c">
								<li><a href="<%=path%>/city/cityDetail.do?id=${c.id}" target="_blank"><img
										src="<%=path%>/foreground/${c.images}" />
									</a>
									<p>
										<a href="specialty_detail.aspx?sid=3">${c.name}</a>
									</p>
								</li>
							</c:forEach>
						</ul>
						<a href="speicalty.aspx" target="_blank" class="more"></a>
					</div>
			</div>	
		</div>
		<div class="clearit"></div>	
	</div>
		<div id="footer">
		<div class="nav">
			<ul>
            					<li><a href="#" target="_blank">关于我们</a></li>
                				<li><a href="#" target="_blank">广告服务</a></li>
                				<li><a href="#" target="_blank">联系方式</a></li>
                				<li><a href="#" target="_blank">网站声明</a></li>
                				<li><a href="#" target="_blank">诚聘英才</a></li>
                				<li><a href="#" target="_blank">合作伙伴</a></li>
                				<li><a href="#">返回顶部</a></li>
			</ul>
		</div>
		<div class="copyright">
			<div class="l">


</body>
</html>
